from django.contrib import admin

from .models import Criteria,ReviewClause, ReviewKey, ReviewReference,RefFile

class CriteriaAdmin(admin.ModelAdmin):
    list_display = ['id','name', 'code', 'pub_date','effective_date']
    list_filter = ['id','name', 'code', 'pub_date','effective_date']

admin.site.register(Criteria, CriteriaAdmin)

class ReviewClauseAdmin(admin.ModelAdmin):
    list_display = ['id','criteria','name','desc', 'level','parent', 'sort']
    list_filter = ['id','criteria','name','desc', 'level','parent', 'sort']

admin.site.register(ReviewClause, ReviewClauseAdmin)

class ReviewKeyAdmin(admin.ModelAdmin):
    list_display = ['id','clause','code','name',  'level','sort','desc']
    list_filter = ['id','clause','code','name',  'level','sort','desc']

admin.site.register(ReviewKey, ReviewKeyAdmin)

# class ReviewReferenceAdmin(admin.ModelAdmin):
#     list_display = ['id', 'clause', 'type','sort']
#     list_filter = ['id', 'clause', 'type','sort']
#
#
# admin.site.register(ReviewReference, ReviewReferenceAdmin)


class RefFileAdmin(admin.ModelAdmin):
    list_display = ['id','name', 'clause', 'sort']
    list_filter = ['id','name', 'clause', 'sort']


admin.site.register(RefFile, RefFileAdmin)
